<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Home extends CI_Controller {

	
	public function index($offset=NULL)
	{
		$this->load->model('daftar_objek_wisata');
		$this->load->library('pagination');
        $config['uri_segment'] = 3;
        $config['base_url'] = site_url('Home/index');
        $config['total_rows'] = $this->daftar_objek_wisata->jumlah_objek_wisata('objek_wisata');
        $config['per_page'] = 3;
        $config['num_links'] = 2;
        $config['cur_tag_open'] = '<span class="current">';
        $config['cur_tag_close'] = '</span>';
        $config['next_link'] = '&gt;&gt;';
        $config['prev_link'] = '&lt;&lt;';
        
        $this->pagination->initialize($config);
       
        $data  = array('query' => $this->daftar_objek_wisata->get_daftar_objek(3,$offset),'pagination'=>$this->pagination->create_links());
        $this->load->view('home.php',$data);
	}
	
	public function event_wisata()
	{
		
	}
	
	public function histori_wisata()
	{
		
	}
}
